#pragma once
#include <sstream>


#include <string>

#include "../SQLExpr.h"
#include "../SQLExprImpl.h"
#include "../statement/SQLSelect.h"

class SQLASTVisitor;

class SQLInSubQueryExpr : virtual public SQLExprImpl
{

private:
  // static long serialVersionUID = 1L;
  BOOL_ptr xnot;
  SQLExpr_ptr expr;
  BOOL_ptr global;

public:
  SQLSelect_ptr subQuery;

  SQLInSubQueryExpr();
  virtual ~SQLInSubQueryExpr();
  SHAREDOBJECT(SQLInSubQueryExpr);

  BOOL_ptr isNot();

  void setNot(BOOL_ptr xnot);

  SQLExpr_ptr getExpr();

  void setExpr(SQLExpr_ptr expr);

  SQLInSubQueryExpr(SQLSelect_ptr select);

  SQLSelect_ptr getSubQuery();

  void setSubQuery(SQLSelect_ptr subQuery);

  void output(std::stringstream *  buf);
  BOOL_ptr isGlobal();
  void setGlobal(BOOL_ptr global);

  // int hashCode();
  // BOOL_ptr equals(Object obj);
protected:
  void accept0(SQLASTVisitor_ptr visitor);
};

